package com.example.sys.solicitation.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.core.po.BaseAuthPo;
import com.example.sys.attachment.po.ISysAttachment;
import com.example.sys.attachment.po.SysAttachment;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "方案征集")
@TableName(value = "sys_solicitation")
public class SysSolicitation extends BaseAuthPo<SysSolicitation> implements ISysAttachment {

    @ApiModelProperty(value = "项目编号")
    @TableField(value = "code")
    private String code;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    @TableField(value = "start_time")
    private Date startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    @TableField(value = "end_time")
    private Date endTime;

    @ApiModelProperty(value = "正文")
    @TableField(value = "context")
    private String context;

    @ApiModelProperty(value = "包含附件")
    private transient List<SysAttachment> fileList = new ArrayList<>();
}
